<template>
  <div>
    <!-- vant组件 -->
    <van-button type="primary" @click="request('/mock/5d098b9763f8e3548381a038/example/', 'get')">GET</van-button>
    <van-button type="info" @click="request('/mock/5d098b9763f8e3548381a038/example/upload', 'post')">POST</van-button>
    <van-button type="warning" @click="request('/mock/5d098b9763f8e3548381a038/example/query', 'get', 'some params')">GET带参</van-button>
    <van-button type="danger" @click="request('/mock/5d098b9763f8e3548381a038/example/upload', 'post', {data: 'some data'})">POST带参</van-button>
    <van-cell title="单元格" icon="location-o" is-link />
  </div>
</template>

<script>
import http from '../../utils/http'

export default {
  methods: {
    request (url, type, params) {
      http.handleBase(url, type, params)
    }
  }
}
</script>

<style>

</style>
